-
Notifications
You must be signed in to change notification settings - Fork 72
Add sql vs typeql page #1005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add sql vs typeql page #1005
Conversation
| ---- | ||
| #!test[read, count=3] | ||
| match | ||
| $p isa person, has name $name, has email $email; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
has email; (no variable) is closer to WHERE email IS NOT NULL in spirit.
| | `JOIN` | Relation patterns | Relations naturally connect entities | ||
| | `INNER JOIN` | Required relation patterns | Both sides must exist | ||
| | `LEFT JOIN` | Optional patterns with `try` | Use `try` for optional matches | ||
| | `RIGHT JOIN` | Optional patterns with `try` | Reverse pattern direction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing CROSS JOIN
| | `LIMIT` | `limit` | Identical | ||
| | `OFFSET` | `offset` | Identical | ||
| | `DISTINCT` | `distinct` | Identical | ||
| | `COUNT/SUM/AVG/etc` | `reduce` with functions | `count`, `sum`, `mean`, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | `COUNT/SUM/AVG/etc` | `reduce` with functions | `count`, `sum`, `mean`, etc. | |
| | `COUNT`/`SUM`/`AVG`/`etc. | `reduce` with `count`/`sum`/`mean`/etc. | Similar, assigned to a variable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall notes:
- I thought we were using sentence case in section titles? Should be fixed if so.
- Placing one sentence per line makes suggestions in a PR easier, and git diffs more meaningful. I suggest reformatting with that in mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed point 1 - point 2 isn't something i think we have an agreed upon style with! I agree with reviewing case, but I do think it's more awkward than being able to write a full paragraph in docs!
|
This repo for some reason also isn't being tested in factory... will merge it and fix anything else that comes up after! |
This reverts commit eb5a90f.
| tag_source = deployment["artifact"]["release"]["download"], | ||
| commit_source = deployment["artifact"]["snapshot"]["download"], | ||
| tag = "3.4.4" | ||
| commit = "828fecc98675712b15e4f6a9b0b2e7ae54d19766" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need assertion bugfix
| count_var_name = "automatic_test_count" | ||
| if counted: | ||
| queries[-1] = queries[-1] + f"\nreduce ${count_var_name} = count;" | ||
| def run_transaction(self, queries: List[str], type: TransactionType, rollback=False) -> Union[int, None]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: removed parallel/optimized execution (shouldn't be needed in docs...)
Simplified with new ability to count fetch queries as well
Goal
Add a little guide on moving between SQL and TypeQL.
Implementation